package com.neusoft.databus.core.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.databus.common.enums.ResourceWorkMode;
import com.neusoft.databus.common.model.Gateway;

/**
 * description
 *
 * @author sunchf
 * @date 2018年12月17日 下午2:08:07
 */
public interface GatewayRepository extends JpaRepository<Gateway, Long>, CustomizedGatewayRepository {

    Gateway findByCode(String code);

    List<Gateway> findByWorkMode(ResourceWorkMode workMode);

    List<Gateway> findByWorkModeAndNodeAndDisabledIsFalse(ResourceWorkMode workMode, int node);
}
